home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / WINDOWS / PRIMER31.ARJ / MRDOS7.TXT < prev    next >
Text File  |  1992-03-12  |  10KB  |  265 lines

  1. ----------------------------[ HARD DISK LEVEL 2 ]-----------------------------
  2.  
  3. EDLIN
  4. -----
  5. Edlin is a LINe EDitor supplied with the DOS disks.  It is a very basic word
  6. processor that allows the creation and editing of ASCII Files including
  7. AUTOEXEC.BAT and the CONFIG.SYS file.  These files are like documents that the
  8. computer reads and interprets.  Each line of these files contains a single
  9. thought for the computer.  EDLIN is a device to create these documents.
  10.  
  11. To enter the EDLIN environment you type the word EDLIN followed by the name of
  12. the file you wish to create or edit:
  13.  
  14.         C:\>EDLIN CONFIG.SYS
  15.  
  16. An asterisk will appear:
  17.  
  18.   *
  19.  
  20. You will type the letter  I  and press <ENTER> to go into the Insert mode:
  21.  
  22.   *I
  23.  
  24. The computer responds with:
  25.  
  26.        1:*
  27.  
  28. This 1 refers to line 1 of the CONFIG.SYS you are now creating.  You will now
  29. just type each line and press <ENTER>.  When finished you will press the <F6>
  30. key to return to the furthest left asterisk:
  31.  
  32.        1:*FILES = 20
  33.        2:*BUFFERS = 15
  34.        3:<F6>
  35.   *
  36.  
  37. At this asterisk you will now type  E  and press <ENTER> to  End the process
  38. and save what you just created:
  39.  
  40.   *E
  41.  
  42. C:\>
  43.  
  44. Other EDLIN commands from the left most asterisk:
  45.  
  46.   *L      - this would List on the screen the entire contents of the
  47.             file being edited
  48.  
  49.   *3D     - this would Delete line #3 from the file
  50.  
  51.   *4I     - this would allow Inserting a new command beginning at line #4
  52.  
  53.   *5      - this would allow making changes to line #5
  54.  
  55.  
  56. EDLIN is adequate for creating and editing small Batch type files.  We saw
  57. earlier (DOS Level 3) that there is another technique for creating these files
  58. utilizing the COPY CON  command.  It is even more limited than EDLIN.           
  59.  
  60.  
  61. BATCH FILES
  62. -----------
  63. These are user created files that have the extension .BAT
  64.  
  65. The file itself contains lines of DOS commands.  Some think of these files as
  66. "macros".  They can be created with an ASCII text editor including the built
  67. in EDLIN editor (see below), or can be created from "the console" (keyboard)
  68. via COPY CON.
  69.  
  70. Batch Files are very useful for program startups.
  71.  
  72. Use the TYPE command to view the contents of a batch file:
  73.  
  74. C:\>TYPE 123.BAT
  75.  
  76.    c:\
  77.    cd\lotus
  78.    123
  79.    cd\
  80.    cls
  81.  
  82. Use the PRINT command to print out the contents of a batch file:
  83.  
  84. C:\>PRINT AUTOEXEC.BAT
  85.  
  86. The PRINT command is like the TYPE command except it is an external DOS
  87. command and sends output to the printer instead of the screen.  Another
  88. approach using redirection discussed earlier (DOS Level 3) would be:
  89.  
  90. C:\>TYPE AUTOEXEC.BAT >PRN
  91.  
  92.  
  93. AUTOEXEC.BAT
  94. ------------
  95. This user created, optional batch file is sought out by DOS when the system is
  96. BOOTed.  If this file is on the BOOT disk, DOS will AUTOmatically open it and
  97. EXECute it.
  98.  
  99. This is an outstanding way to automate the execution of certain DOS commands
  100. like DATE, TIME, PATH, PROMPT, etc. which should be done EVERY time the system
  101. is booted.
  102.  
  103. EX:
  104.  
  105.           date
  106.           time
  107.           path c:\;c:\dos;c:\batch;c:\utility
  108.           subst e: c:\dbase\dbfiles
  109.           prompt $p$g
  110.           cls                                                                   
  111.  
  112. CONFIG.SYS
  113. ----------
  114. This, too, is an ASCII file created and viewed like AUTOEXEC.bat.  It also is
  115. optional and is sought out by DOS when the system is BOOTed. HOWEVER, the
  116. command lines that this file uses ARE NOT DOS type commands found in .BAT
  117. files.  Rather, special CONFIGuration SYStem commands are used.
  118.  
  119. CONFIGuration SYStem commands are needed to define certain hardware
  120. parameters.  For example, if your system uses special size disk drives, extra
  121. printers, extra modems, extra input devices (joysticks, mouse), RAM disks.
  122.  
  123. EX:  CONFIG.sys
  124.  
  125.         FILES = 20
  126.         BUFFERS = 15
  127.  
  128. In this example, FILES = 20 means that DOS will allow up to 20 files opened
  129. simultaneously.  If this line were not present in CONFIG.SYS, DOS would only
  130. allow up to 7 files.  Do we need up to 20?  Certain programs (dBASE,
  131. Accounting, etc.) state early in their manuals that this parameter needs to be
  132. set at 20 for the software to operate correctly.
  133.  
  134. The BUFFERS = 15 defines a staging area within RAM for portions of files that
  135. are not on the screen yet.  For example, in an Accounting program if you told
  136. the computer to bring up the last 10 invoices entered, it would display these
  137. 10 invoices.  However, unknown to you it actually took the last 30 invoices in
  138. anticipation that you would want to see them right away also.  The extra 20
  139. that the system brought into RAM are sitting within the BUFFERS.  DOS allows
  140. this and does this as a way to speed up the system.  Items that are sitting in
  141. RAM can be accessed seemingly instantly versus items that must be sought from
  142. a disk.
  143.  
  144. If not told, DOS automatically sets BUFFERS to 3.  If BUFFERS are so useful,
  145. why not set them to their maximum of 99?  The reason is that DOS is guessing
  146. which information you will need next.  If it guesses wrong - for example the
  147. next invoice you wish to look at is 1500 ago, it must first check all the
  148. BUFFERS before realizing that it will have to go to the disk to retrieve the
  149. needed information.  It actually slows the process down in this case.  Most
  150. purchased software will note if this command is needed and what to set it to.
  151. BUFFERS = 15 is a common level to operate at.
  152.  
  153.  
  154. BACKUP and RESTORE
  155. ------------------
  156. Periodically, the entire hard drive or at least the subdirectories containing
  157. data files should be BACKed-UP onto floppies or tape for safe storage in the
  158. event of a hard drive crash or accidental erasure.  Should that happen, the
  159. files are then simply RESTOREd.
  160.  
  161. DOS provides two commands to accomplish this - BACKUP and RESTORE commands.
  162. Unfortunately, these are slow and problematic.  The world is full of third
  163. party alternatives that are far superior in speed, ease of use, data
  164. compression, and ability to incorporate into batch files so the operator only
  165. needs to "kickoff" a batch file and have a supply of floppies nearby to
  166. complete.                                                                       
  167.  
  168. EX: Using DOS commands:
  169.  
  170.      C:\>BACKUP C:\lotus\*.wks A:  /S  /M
  171.  
  172.  "A"     is the DESTINATION drive
  173.  
  174.  C:\lotus  is the SOURCE directory
  175.  
  176.  *.wks   specifies any files with an extension  .wks  (worksheet files)
  177.  
  178.  /S      specifies any Subdirectories beneath \LOTUS directory
  179.          (that contain *.wks files)
  180.  
  181.  /M      only the files that have been Modified since Last BACKUP (using the
  182.          same disk set as last used during the BACKUP)
  183.  
  184.  
  185. NOTE: Have a supply of disks for the "A" drive ready.  These floppies do not
  186. have to be formatted.  If more than 1 is required, be sure to number in
  187. sequence.  This process will erase whatever used to be on the disk.
  188.  
  189. Now, if the files need to be restored to the hard drive due to failure or
  190. erasure:   Start out with "disk #1" in the "A" drive.
  191.  
  192.      A:\>RESTORE A: C:\lotus\*.wks  /S  /M
  193.  
  194.  "A"    is now the SOURCE
  195.  
  196.  /M     only files Modified or Deleted since they were backed up
  197.  
  198.  
  199. The BACKUP and RESTORE commands were designed for emergency situations.  They
  200. are better than nothing.  Many wish to use them as a way to transfer a large
  201. group of files from one machine to another.  This will only work if the
  202. version of DOS on each machine is identical.
  203.  
  204. Another problem with these DOS commands, is that you end up with a very large
  205. number of disks.  There is no data compression.  Most competing backup
  206. products provide compression that results in up to 50% fewer backup disks.
  207.  
  208. A final hazard:  If you end up with 20 disks, and disk number 10 is lost or
  209. destroyed, you may never be able to access disks 11-20 or 1-9.  The 20 disk
  210. set is like one continuous floppy disk.  By destroying 1 disk, it is like you
  211. destroyed the giant continuous floppy.  This is not true of competing products
  212. like FASTBACK, PCTOOLS or NORTON UTILITIES.
  213.  
  214.                                                                                 
  215. XCOPY
  216. -----
  217. Beginning with DOS 3.2, the XCOPY command was added as a useful hybrid of the
  218. COPY command and the BACKUP/RESTORE mess.  It addresses the issue that COPY
  219. cannot copy more files than a disk can hold.  But, XCOPY cannot copy a single
  220. file that is larger than a single disk like the BACKUP command can.
  221.  
  222.  
  223. C:\>XCOPY C:\*.* a:  /S /M /D:mm-dd-yy
  224.  
  225.  
  226. The options:   /S    - includes all subdirectories hung from the current one
  227.                        (in the case shown we are in the root directory)
  228.  
  229.                /M    - includes only files that have been modified since the
  230.                        last XCOPY was performed
  231.  
  232.                /D:mm-dd-yy   - includes only files with a date greater than or
  233.                                equal to the one specified
  234.  
  235.  
  236. XCOPY:      - Is faster than the COPY or BACKUP commands
  237.             - Transfers entire directories
  238.             - Copies files selectively by modification status or date
  239.             - Uses the COPY command (which is DOS version independent) to copy
  240.               individual files at a later date.  Remember that BACKUP requires
  241.               RESTORE to reverse.
  242.             - Is unable to copy single files that are larger than a single
  243.               disk (BACKUP is the only DOS command that is able to do this.)
  244.             - Requires target disks that have been formatted
  245.  
  246.  
  247. HARD DISK ORGANIZATION PRINCIPLES
  248. ---------------------------------
  249.  
  250.      1. Put only directories in the Root directory except:
  251.         Command.com, Config.sys, Autoexec.bat
  252.  
  253.      2. Use many batch files.  Put them in a \BATCH subdirectory
  254.  
  255.      3. Keep the PATH command short in autoexec.bat
  256.         PATH = c:\DOS;c:\BATCH;c:\UTILITY
  257.  
  258.      4. Keep the subdirectories sorted (use third party software tools)
  259.  
  260.      5. Defragment files on a regular basis by- using some third party
  261.         software: PC-TOOLS, NORTON UTILITIES, VOPT, etc.
  262.  
  263.  
  264. *****   END OF FILE:  Press <ESC> to return to Main Menu   *****
  265.